package com.schoolcloud.api.client;

import com.schoolcloud.common.exception.UserNotExistException;
import com.schoolcloud.common.model.R;
import com.schoolcloud.api.dto.LoginModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("sc-system")
public interface SystemClient {

    @PostMapping("system/user/login")
    R<String> login(@RequestBody LoginModel user) throws UserNotExistException;
    @GetMapping("system/permission/code/user")
    public R<List<String>> getUserPermissionCode(@RequestParam String userId);

    @GetMapping("system/role/code/user")
    public R<List<String>> getUserRoleCode(@RequestParam String userId);
}
